import { request } from '@/utils/request';
import type { StatDataModel,StatInfo,PayChannelCountInfo } from '@/api/model/statModel';
//import {PageData} from '@/api/model/pageModel'

const Api = {
  StatData: '/stat/data', //汇总
  StatList:'/stat/list',  //统计数据
  CountPayChannel:'/stat/paychannel'
};

//获取统计汇总
//1按月统计 2按周统计
export function getStatData(type:number) {
  return request.get<StatDataModel[]>({
      url: Api.StatData+'?type='+type
    });
}

//交易额查询 1上月 2本月 3上周 4本周
export function getStatList(type:number)
{
  return request.get<Array<StatInfo>>({
      url: Api.StatList+'?type='+type
    });
}

//支付渠道交易量 1上月 2本月 3上周 4本周
export function countPayChannel(type:number)
{
  return request.get<PayChannelCountInfo>({
    url:Api.CountPayChannel+'?type='+type
  })
}
